.class final Llt/noframe/gpsfarmguide/share/Share$1;
.super Ljava/lang/Object;
.source "Share.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/share/Share;->makeShare(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

.field final synthetic val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/models/MeasuringModel;Llt/noframe/gpsfarmguide/analytics/FireAnalytics;)V
    .locals 0

    .line 57
    iput-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 2

    .line 59
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getMeasuringType()I

    move-result p1

    iget-object v0, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-static {p1, v0}, Llt/noframe/gpsfarmguide/share/Share;->access$000(ILlt/noframe/gpsfarmguide/models/MeasuringModel;)Z

    move-result p1

    const/4 v0, 0x1

    if-nez p1, :cond_0

    .line 60
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p2

    const v1, 0x7f1100ca

    invoke-virtual {p2, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    return-void

    :cond_0
    if-eqz p2, :cond_4

    if-eq p2, v0, :cond_3

    const/4 p1, 0x2

    if-eq p2, p1, :cond_1

    goto :goto_0

    .line 74
    :cond_1
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    const-string p2, "save_to_device"

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendShareDialog(Ljava/lang/String;)V

    .line 75
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    const-string p2, "android.permission.WRITE_EXTERNAL_STORAGE"

    invoke-static {p1, p2}, Landroidx/core/content/ContextCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I

    move-result p1

    if-nez p1, :cond_2

    .line 76
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-static {p1}, Llt/noframe/gpsfarmguide/share/Share;->access$300(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    goto :goto_0

    .line 78
    :cond_2
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getPermissionsCallbacker()Llt/noframe/gpsfarmguide/PermissionsCallbacker;

    move-result-object p1

    new-instance v1, Llt/noframe/gpsfarmguide/share/Share$1$1;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/share/Share$1$1;-><init>(Llt/noframe/gpsfarmguide/share/Share$1;)V

    invoke-virtual {p1, v1}, Llt/noframe/gpsfarmguide/PermissionsCallbacker;->setOnPermissionResult(Llt/noframe/gpsfarmguide/PermissionsCallbacker$OnPermissionResult;)V

    .line 90
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getPermissionsCallbacker()Llt/noframe/gpsfarmguide/PermissionsCallbacker;

    move-result-object p1

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    aput-object p2, v0, v1

    const/16 p2, 0x630

    invoke-virtual {p1, v0, p2}, Llt/noframe/gpsfarmguide/PermissionsCallbacker;->onRequestPermission([Ljava/lang/String;I)V

    goto :goto_0

    .line 70
    :cond_3
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    const-string p2, "send_as_file"

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendShareDialog(Ljava/lang/String;)V

    .line 71
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Llt/noframe/gpsfarmguide/share/Share;->access$200(Ljava/lang/String;)V

    goto :goto_0

    .line 66
    :cond_4
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    const-string p2, "send_link_via_farmis"

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendShareDialog(Ljava/lang/String;)V

    .line 67
    iget-object p1, p0, Llt/noframe/gpsfarmguide/share/Share$1;->val$measuring:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Llt/noframe/gpsfarmguide/share/Share;->access$100(Ljava/lang/String;)V

    :goto_0
    return-void
.end method
